﻿//只能输入0~9
function check_isnum() {
    if ((window.event.keyCode > 95 && window.event.keyCode < 106)
  || (window.event.keyCode > 47 && window.event.keyCode < 59)
  || window.event.keyCode == 8
  || window.event.keyCode == 9
  || window.event.keyCode == 46
  || window.event.keyCode == 37
  || window.event.keyCode == 38
  || window.event.keyCode == 39
  || window.event.keyCode == 40) {

        return true;
    }
    else {

        return false;
    }
}
//只能输入0~9或者。
function check_isdecimal() {
    if ((window.event.keyCode > 95 && window.event.keyCode < 106)
  || (window.event.keyCode > 47 && window.event.keyCode < 59)
  || window.event.keyCode == 8
  || window.event.keyCode == 46
  || window.event.keyCode == 37
  || window.event.keyCode == 39
  || window.event.keyCode == 110
  || window.event.keyCode == 190
  ) {
        return true;
    }
    else {
        return false;
    }
}